// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLLimit;
// import com.alibaba.druid.sql.ast.SQLOrderBy;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLShowProcessListStatement.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLLimit.h"

BOOL_ptr SQLShowProcessListStatement::isMpp()
{
  return mpp;
}

void SQLShowProcessListStatement::setMpp(BOOL_ptr mpp)
{
  this->mpp = mpp;
}

BOOL_ptr SQLShowProcessListStatement::isFull()
{
  return full;
}

void SQLShowProcessListStatement::setFull(BOOL_ptr full)
{
  this->full = full;
}

// @Override
void SQLShowProcessListStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLShowProcessListStatement)))
  {
    acceptChild(visitor, where);
    acceptChild(visitor, orderBy);
    acceptChild(visitor, limit);
  }
  visitor->endVisit(SharedObject(SQLShowProcessListStatement));
}

SQLExpr_ptr SQLShowProcessListStatement::getWhere()
{
  return where;
}

void SQLShowProcessListStatement::setWhere(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLShowProcessListStatement));
  }
  this->where = x;
}

SQLOrderBy_ptr SQLShowProcessListStatement::getOrderBy()
{
  return orderBy;
}

void SQLShowProcessListStatement::setOrderBy(SQLOrderBy_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLShowProcessListStatement));
  }
  this->orderBy = x;
}

SQLLimit_ptr SQLShowProcessListStatement::getLimit()
{
  return limit;
}

void SQLShowProcessListStatement::setLimit(SQLLimit_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLShowProcessListStatement));
  }
  this->limit = x;
}
